using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._Workflow._Tasks
{
    /// <summary>
    /// <para>Create Job For Task</para>
    /// <para>Automatically creates a Workflow Manager (Classic) job for a task.</para>
    /// <para>自动为任务创建 Workflow Manager （Classic） 作业。</para>
    /// </summary>    
    [DisplayName("Create Job For Task")]
    public class CreateJobForTask : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateJobForTask()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_job_id">
        /// <para>Job ID</para>
        /// <para>The job ID of the Workflow Manager (Classic) job that will be the parent to the newly created child job. The Current Task extended property value for this job will be used to determine the type of task job that will be created.</para>
        /// <para>Workflow Manager （Classic） 作业的作业 ID，该作业将成为新创建的子作业的父级。此作业的“当前任务”扩展属性值将用于确定将创建的任务作业的类型。</para>
        /// </param>
        public CreateJobForTask(long? _job_id)
        {
            this._job_id = _job_id;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Create Job For Task";

        public override string CallName => "topographic.CreateJobForTask";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_job_id, _database_path, _child_job_id];

        /// <summary>
        /// <para>Job ID</para>
        /// <para>The job ID of the Workflow Manager (Classic) job that will be the parent to the newly created child job. The Current Task extended property value for this job will be used to determine the type of task job that will be created.</para>
        /// <para>Workflow Manager （Classic） 作业的作业 ID，该作业将成为新创建的子作业的父级。此作业的“当前任务”扩展属性值将用于确定将创建的任务作业的类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _job_id { get; set; }


        /// <summary>
        /// <para>Input Database Path</para>
        /// <para>The Workflow Manager (Classic) database connection file (.jtc) that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.</para>
        /// <para>包含作业信息的 Workflow Manager （Classic） 数据库连接文件 （.jtc）。如果未指定连接文件，则将使用当前默认的 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _database_path { get; set; } = null;


        /// <summary>
        /// <para>Child Job ID</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Child Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long _child_job_id { get; set; }


        public CreateJobForTask SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}